home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / MENU_UTL / PULL32TP / PULLTEST.PAS < prev    next >
Pascal/Delphi Source File  |  1988-10-21  |  28KB  |  564 lines

  1. Program PullTest;
  2.  
  3. uses Crt, Dos, Pulldwn1;
  4.  
  5. label menu2;
  6.  
  7. (* ------------------------------------------------------------------------ *)
  8. (*                                                                          *)
  9. (*  This source and PULLDWN1.TPU may be used freely in your programs.       *)
  10. (*                                                                          *)
  11. (*  Copywrite 1987       David Sampson                                      *)
  12. (*                       P.O. Box 060573                                    *)
  13. (*                       Palm Bay, FL  32906                                *)
  14. (*                                                                          *)
  15. (*  The enhanced version with Source is available for $25 (overseas         *)
  16. (*  customers please add $3 for shipping.                                   *)
  17. (* ------------------------------------------------------------------------ *)
  18.  
  19.  
  20. (* ------------------------------------------------------------------------ *)
  21. (*         Start of Pulldown Declarations Contained in Pulldown Unit        *)
  22. (* ------------------------------------------------------------------------ *)
  23.  
  24. (*  defines a data structure that holds the entire contents for each submenu *)
  25.  
  26. {type}
  27. (*  -------------------------  SubMenu Declarations  ----------------------- *)
  28. (*  Num_Submenu_Entries -  is the number of things in the submenu            *)
  29. (*  SubmenuChar - is the Captialized first letter in the submenu string.     *)
  30. (*                Make the first letter unique so that pressing it (upper or *)
  31. (*                lower case) makes the submenu selection.  You could also   *)
  32. (*                substitute numbers.                                        *)
  33. (*  SubmenuString - is the rest of the string that will be displayed in each *)
  34. (*                  submenu position.                                              *)
  35. (*  ------------------------------------------------------------------------ *)
  36. {
  37.     Num_Pop_Up_Menu_Entries = 1..10;
  38.     SubMenuPtr     = ^SubMenu_Record;
  39.     SubMenu_Record = record
  40.               Num_Submenu_Entries : Integer;
  41.               Submenu_Width       : Integer;
  42.               SubmenuChar         : Array [1..10] of char;
  43.               SubmenuString       : Array [1..10] of string;
  44.     end;
  45.     MenuPtr    = ^MenuItemsM;
  46.     MenuItemsM = Record
  47.                     MenuEntriesFirst  : Array [Num_Pop_Up_Menu_Entries] of char;
  48.                     MenuEntriesString : Array [Num_Pop_Up_Menu_Entries] of string;
  49.                  end;
  50.     string80 = string[80]; }
  51.  
  52. (*      define the main pulldown menu header line, contents and positions    *)
  53.  
  54. {
  55.  
  56. var
  57.   NumofHeaders                :  Integer;
  58.   Pulldown_Menu_Number        :  Integer;
  59.   Pulldown_Menu_Selection     :  Integer;
  60.   PopUp_Menu_Selection        :  Integer;
  61.   Show_Sub                    :  Boolean;
  62.   Selection_Made              :  Boolean;
  63.   Done                        :  Boolean;
  64.   FirstChar                   :  Array [1..10] of Char;
  65.   HeadLine                    :  Array [1..10] of String;
  66.   HeadSpot                    :  Array [1..10] of Integer;
  67.   SubMenu                     :  Array [1..10] of SubmenuPtr;
  68.   Menu_Items                  :  Array [1..10] of MenuPtr;
  69.   ch                          :  Char;
  70.   Pulldown_Title_Justify      :  Char;
  71.   Main_Title                  :  String80;
  72.  
  73.   Procedure Cursor_On;
  74.   Procedure Cursor_Off;
  75.   Procedure DrawMainHeader;
  76.   Procedure HandleKeyMain     (ch : Char);
  77.   Procedure HandleFuncKeyMain (ch : Char);
  78.   Procedure Save_Screen;
  79.   Procedure Restore_Screen;
  80.   Procedure MakeMenu (x1_M, y1_M, x2_M, y2_M   :  Integer;
  81.                       Menu_ItemsM              :  MenuPtr);
  82.  
  83. }
  84.  
  85. (* ------------------------------------------------------------------------ *)
  86. (*         End of Pulldown Declarations contained in Pulldown Unit          *)
  87. (* ------------------------------------------------------------------------ *)
  88.  
  89.       Var    Done_PopUp_Menu   :  Boolean;
  90.  
  91. (* --------------------------- Your Variables ----------------------------- *)
  92.  
  93.            { put your variables here }
  94.  
  95. (* ------------------------------------------------------------------------ *)
  96.  
  97. Procedure MainMenu_Init;
  98. begin
  99.      NumofHeaders := 4;     { number of headers in pulldown menu }
  100.      FirstChar[1] := 'E';   { first char that will be highlighted }
  101.      FirstChar[2] := 'D';   { use char or numbers, but make them unique }
  102.      FirstChar[3] := 'G';
  103.      FirstChar[4] := 'P';
  104.      HeadLine[1]  := 'dit';  { rest of pulldown string }
  105.      Headline[2]  := 'isk';
  106.      HeadLine[3]  := 'raph';
  107.      HeadLine[4]  := 'ortfolio';
  108.      HeadSpot[1]  := 10;         { starting col for pulldown headers }
  109.      HeadSpot[2]  := 25;
  110.      HeadSpot[3]  := 42;
  111.      HeadSpot[4]  := 58;
  112.      Main_Title := 'Program Title';   {set to '' if you do not want title}
  113.      Pulldown_Title_Justify  := 'c';  { L, R & C are valid }
  114. end;
  115.  
  116.  
  117. (* ---------------------  Pulldown Sub Menu Definitions  ------------------- *)
  118.  
  119. Procedure Submenu_Init;
  120. begin
  121. (* ------------------------------------------------------------------------- *)
  122. (*                         Contents of Sub Menu # 1                          *)
  123. (* ------------------------------------------------------------------------- *)
  124.      new (SubMenu[1]);     {creates variable on the heap}
  125.      with Submenu[1]^ do
  126.           begin
  127.                Num_Submenu_Entries    :=     3;
  128.                Submenu_Width          :=     8;
  129.                SubMenuChar[1]         :=   '1';    { first char or num will }
  130.                SubmenuChar[2]         :=   '2';    { be highlighted         }
  131.                SubmenuChar[3]         :=   '3';
  132.                SubMenuString[1]       :=   ' Item 1';  { rest of string }
  133.                SubmenuString[2]       :=   ' Item 2';
  134.                SubmenuString[3]       :=   ' Item 3';
  135.           end;
  136. (* ------------------------------------------------------------------------- *)
  137.  
  138. (* ------------------------------------------------------------------------- *)
  139. (*                         Contents of Sub Menu # 2                          *)
  140. (* ------------------------------------------------------------------------- *)
  141.      new (SubMenu[2]);     {creates variable on the heap}
  142.      with Submenu[2]^ do
  143.           begin
  144.                Num_Submenu_Entries    :=     3;
  145.                Submenu_Width          :=     8;
  146.                SubMenuChar[1]         :=   'A';
  147.                SubMenuChar[2]         :=   'B';
  148.                SubMenuChar[3]         :=   'Q';
  149.                SubMenuString[1]       :=   ' Item 1';
  150.                SubMenuString[2]       :=   ' Item 2';
  151.                SubmenuString[3]       :=   'uit';
  152.           end;
  153. (* ------------------------------------------------------------------------- *)
  154.  
  155. (* ------------------------------------------------------------------------- *)
  156. (*                         Contents of Sub Menu # 3                          *)
  157. (* ------------------------------------------------------------------------- *)
  158.      new (SubMenu[3]);     {creates variable on the heap}
  159.      with SubMenu[3]^ do
  160.           begin
  161.                Num_Submenu_Entries    :=     3;
  162.                Submenu_Width          :=    20;
  163.                SubMenuChar[1]         :=    'P';
  164.                SubMenuChar[2]         :=    'G';
  165.                SubMenuChar[3]         :=    'C';
  166.                SubMenuString[1]       :=    'lot a single file';
  167.                SubMenuString[2]       :=    'raph multiple files';
  168.                SubMenuString[3]       :=    'ompare two files';
  169.           end;
  170. (* ------------------------------------------------------------------------- *)
  171.  
  172. (* ------------------------------------------------------------------------- *)
  173. (*                         Contents of Sub Menu # 4                          *)
  174. (* ------------------------------------------------------------------------- *)
  175.      new (SubMenu[4]);     {creates variable on the heap}
  176.      with SubMenu[4]^ do
  177.           begin
  178.                Num_Submenu_Entries    :=     2;
  179.                Submenu_Width          :=    16;
  180.                SubMenuChar[1]         :=   'E';
  181.                SubMenuChar[2]         :=   'P';
  182.                SubMenuString[1]       :=   'dit Portfolio';
  183.                SubMenuString[2]       :=   'ortfolio Report';
  184.           end;
  185. (* ------------------------------------------------------------------------- *)
  186. end;  { end of submenu init }
  187.  
  188.  
  189. (*  ------------------------------------------------------------------------ *)
  190. (*                      Pop Up Menu Declarations                             *)
  191. (*  ------------------------------------------------------------------------ *)
  192.  
  193. Procedure Menu_Init1;
  194. begin
  195.       new (Menu_Items[1]); {creates variable on the heap}
  196.       With Menu_Items[1]^ do
  197.            begin
  198.                 MenuEntriesFirst[1]  := '1'; { highlighted first char or num }
  199.                 MenuEntriesString[1] := ' Menu Item 1';  { rest of string }
  200.                 MenuEntriesFirst[2]  := '2';
  201.                 MenuEntriesString[2] := ' Menu Item 2';
  202.                 MenuEntriesFirst[3]  := '3';
  203.                 MenuEntriesString[3] := ' Menu Item 3';
  204.                 MenuEntriesFirst[4]  := '4';
  205.                 MenuEntriesString[4] := ' Menu Item 4';
  206.                 MenuEntriesFirst[5]  := '5';
  207.                 MenuEntriesString[5] := ' Menu Item 5';
  208.            end;
  209. end;
  210.  
  211. Procedure Menu_Init2;
  212. Begin
  213.       new (Menu_Items[2]); {creates variable on the heap}
  214.       With Menu_Items[2]^ do
  215.            begin
  216.                 MenuEntriesFirst[1]  := '1'; { highlighted first char or num }
  217.                 MenuEntriesString[1] := ' Menu Item 1';  { rest of string }
  218.                 MenuEntriesFirst[2]  := '2';
  219.                 MenuEntriesString[2] := ' Menu Item 2';
  220.                 MenuEntriesFirst[3]  := '3';
  221.                 MenuEntriesString[3] := ' Return to Pulldown Menu';
  222.            end;
  223. end;
  224.  
  225. Procedure Menu_Init3;
  226. Begin
  227.       new (Menu_Items[3]); {creates variable on the heap}
  228.       With Menu_Items[3]^ do
  229.            begin
  230.                 MenuEntriesFirst[1]  := '1'; { highlighted first char or num }
  231.                 MenuEntriesString[1] := ' Menu Item 1';  { rest of string }
  232.                 MenuEntriesFirst[2]  := '2';
  233.                 MenuEntriesString[2] := ' Menu Item 2';
  234.                 MenuEntriesFirst[3]  := '3';
  235.                 MenuEntriesString[3] := ' Menu Item 3';
  236.                 MenuEntriesFirst[4]  := '4';
  237.                 MenuEntriesString[4] := ' Menu Item 4';
  238.                 MenuEntriesFirst[5]  := '5';
  239.                 MenuEntriesString[5] := ' Menu Item 5';
  240.                 MenuEntriesFirst[6]  := '6';
  241.                 MenuEntriesString[6] := ' Menu Item 6';
  242.                 MenuEntriesFirst[7]  := '7';
  243.                 MenuEntriesString[7] := ' Menu Item 7';
  244.            end;
  245. end;
  246.  
  247. Procedure Menu_Init4;
  248. Begin
  249.       new (Menu_Items[4]); {creates variable on the heap}
  250.       With Menu_Items[4]^ do
  251.            begin
  252.                 MenuEntriesFirst[1]  := '1'; { highlighted first char or num }
  253.                 MenuEntriesString[1] := ' Menu Item 1';  { rest of string }
  254.                 MenuEntriesFirst[2]  := '2';
  255.                 MenuEntriesString[2] := ' Menu Item 2';
  256.                 MenuEntriesFirst[3]  := '3';
  257.                 MenuEntriesString[3] := ' Menu Item 3';
  258.                 MenuEntriesFirst[4]  := '4';
  259.                 MenuEntriesString[4] := ' Menu Item 4';
  260.                 MenuEntriesFirst[5]  := '5';
  261.                 MenuEntriesString[5] := ' Menu Item 5';
  262.            end;
  263. end;
  264.  
  265. Procedure Menu_Init5;
  266. Begin
  267.       new (Menu_Items[5]); {creates variable on the heap}
  268.       With Menu_Items[5]^ do
  269.            begin
  270.                 MenuEntriesFirst[1]  := 'A'; { highlighted first char or num }
  271.                 MenuEntriesString[1] := ' Menu Item 1';  { rest of string }
  272.                 MenuEntriesFirst[2]  := 'B';
  273.                 MenuEntriesString[2] := ' Menu Item 2';
  274.                 MenuEntriesFirst[3]  := 'C';
  275.                 MenuEntriesString[3] := ' Menu Item 3';
  276.                 MenuEntriesFirst[4]  := 'D';
  277.                 MenuEntriesString[4] := ' Menu Item 4';
  278.                 MenuEntriesFirst[5]  := 'E';
  279.                 MenuEntriesString[5] := ' Menu Item 5';
  280.            end;
  281. end;
  282.  
  283. (*  ------------------------------------------------------------------------ *)
  284. (*                      End of Pop Up Menu Declarations                      *)
  285. (*  ------------------------------------------------------------------------ *)
  286.  
  287.  
  288.  
  289. (*  ------------------------------------------------------------------------ *)
  290. (*                            Start of Main Program                          *)
  291. (*  ------------------------------------------------------------------------ *)
  292.  
  293. BEGIN
  294.      Cursor_Off;
  295.      MainMenu_Init;
  296.      Submenu_Init;
  297.      DrawMainHeader;
  298.      repeat
  299.            ch := readkey;
  300.            if ch <> #0 then    HandleKeyMain (ch)
  301.                else            HandleFuncKeyMain (ReadKey);
  302.            If Selection_Made = True then
  303.               begin
  304.                    Show_Sub := False;
  305.                    Selection_Made := False;
  306.                    textcolor (7); textbackground (0);
  307.  
  308. (* ------------------------------------------------------------------------ *)
  309. (*                            Your Code Goes Here                           *)
  310. (* ------------------------------------------------------------------------ *)
  311.  
  312. (* ------------------------------------------------------------------------ *)
  313. (*  The Pulldown Menu System will return three values:                      *)
  314. (*                                                                          *)
  315. (*      Pulldown_Menu_Number    - The Selected Pulldown Menu header         *)
  316. (*      Pulldown_Menu_Selection - The item number selected in the submenu   *)
  317. (*      PopUp_Menu_Selection    - The PopUp menu item number if a menu was  *)
  318. (*                                displayed                                 *)
  319. (*                                                                          *)
  320. (*  Each of these values can be used in a case statement to trigger some    *)
  321. (*  action or call to one of your routines.                                 *)
  322. (* ------------------------------------------------------------------------ *)
  323.  
  324.           Case Pulldown_Menu_Number of
  325.  
  326.                1: Case Pulldown_Menu_Selection of
  327.  
  328.                       1 : begin
  329.                                Menu_Init1;
  330.                                MakeMenu (33, 12, 13, 5, Menu_Items[1]);
  331.                                gotoxy (15,15);
  332.                                writeln ('Here''s your first screen.');
  333.                                gotoxy (15,16);
  334.                                writeln ('This will now be saved in memory to demonstrate the');
  335.                                gotoxy (15,17);
  336.                                writeln ('Save & Restore Screen Procedures.');
  337.                                gotoxy (30,20);
  338.                                writeln ('Hit the Return key to continue.');
  339.                                repeat
  340.                                      ch := readKey;
  341.                                until ch = #13;
  342.                                Save_Screen;
  343.                                clrscr;
  344.                                gotoxy (5,5);
  345.                                write ('You selected Pulldown Menu Number ',
  346.                                        Pulldown_Menu_Number,
  347.                                     ', Sub Menu Number ',
  348.                                        Pulldown_Menu_Selection);
  349.                                GotoXY (5,7);
  350.                                WriteLn ('You selected PopUp Menu Entry ',
  351.                                          PopUp_Menu_Selection);
  352.                                GotoXY (5,10);
  353.                                writeln ('With this information and a CASE statement you can now run your application.');
  354.                                gotoXY (5,14);
  355.                                WriteLn ('Hit the Return key to go back to the Pulldown menu & restore the');
  356.                                gotoxy (5,15);
  357.                                writeln ('previous screen.');
  358.                                repeat
  359.                                      ch := readKey;
  360.                                until ch = #13;
  361.                                Restore_Screen;
  362.                                repeat
  363.                                      ch := readKey;
  364.                                until ch = #13;
  365.                                gotoxy(1,14); ClrEol;
  366.                                gotoxy(1,15); ClrEol;
  367.                                gotoxy(1,16); ClrEol;
  368.                                gotoxy(1,17); ClrEol;
  369.                                gotoxy(1,18); ClrEol;
  370.                                gotoxy(1,20); ClrEol;
  371.                            end;
  372.                        2 : begin
  373.                                 Done_PopUp_Menu := false;
  374.           Menu2:                Menu_Init2;
  375.                                 MakeMenu (33, 12, 25, 3, Menu_Items[2]);
  376.                                 If PopUp_Menu_Selection = 3 then
  377.                                       Done_PopUp_Menu := True;
  378.                                 If (not Done_PopUp_Menu) Then
  379.                                    begin
  380.                                          Save_Screen;
  381.                                          ClrScr;
  382.                                          gotoxy (5,10);
  383.                                          write ('You selected Pulldown Menu ', Pulldown_Menu_Number,
  384.                                                 ', Sub Menu Number ', Pulldown_Menu_Selection);
  385.                                          GotoXY (5,12);
  386.                                          WriteLn ('You selected PopUp Menu Number ',
  387.                                                    PopUp_Menu_Selection);
  388.                                          gotoxy (5,15); writeln ('Hit the return key to continue');
  389.                                          repeat ch := readkey; until ch = #13;
  390.                                          Restore_Screen;
  391.                                          Goto Menu2;
  392.                                    end;
  393.                            end;
  394.                        3 : begin
  395.                                gotoxy (5,7);
  396.                                write ('You selected Pulldown Menu Number ',
  397.                                        Pulldown_Menu_Number,
  398.                                     ', Sub Menu Number ',
  399.                                        Pulldown_Menu_Selection);
  400.                                GotoXY (5,10);
  401.                                writeln ('With this information and a CASE statement you can now run your application.');
  402.                                gotoXY (5,14);
  403.                                WriteLn ('Hit the Return to continue ...');
  404.                                repeat
  405.                                      ch := readkey;
  406.                                until ch = #13;
  407.                                gotoxy (1,7); ClrEol;
  408.                                gotoxy (1,10); ClrEol;
  409.                                gotoxy (1,14); ClrEol;
  410.                            end;
  411.                   end; { end of case for submenu #1 }
  412.  
  413.                2: Case Pulldown_Menu_Selection of
  414.                       1 : begin
  415.                                Menu_Init4;
  416.                                MakeMenu (33, 12, 13, 5, Menu_Items[4]);
  417.                                gotoxy (5,7);
  418.                                write ('You selected Pulldown Menu ',
  419.                                        Pulldown_Menu_Number,
  420.                                     ', Sub Menu Number ', Pulldown_Menu_Selection);
  421.                                GotoXY (5,10);
  422.                                WriteLn ('You selected PopUp Menu Number ',
  423.                                          PopUp_Menu_Selection);
  424.                                GotoXY (5,13);
  425.                                writeln ('With this information and a CASE statement you can now run your application.');
  426.                                gotoXY (5,15);
  427.                                WriteLn ('Hit the Return to continue ...');
  428.                                repeat
  429.                                      ch := readkey;
  430.                                until ch = #13;
  431.                                gotoxy (1,7); ClrEol;
  432.                                gotoxy (1,10); ClrEol;
  433.                                gotoxy (1,13); ClrEol;
  434.                                gotoxy (1,15); ClrEol;
  435.                            end;
  436.                        2 : begin
  437.                                 Menu_Init5;
  438.                                 MakeMenu (33, 12, 13, 5, Menu_Items[5]);
  439.                                gotoxy (5,7);
  440.                                write ('You selected Pulldown Menu ',
  441.                                        Pulldown_Menu_Number,
  442.                                     ', Sub Menu Number ', Pulldown_Menu_Selection);
  443.                                GotoXY (5,10);
  444.                                WriteLn ('You selected PopUp Menu Number ',
  445.                                          PopUp_Menu_Selection);
  446.                                GotoXY (5,13);
  447.                                writeln ('With this information and a CASE statement you can now run your application.');
  448.                                gotoXY (5,15);
  449.                                WriteLn ('Hit the Return to continue ...');
  450.                                repeat
  451.                                      ch := readkey;
  452.                                until ch = #13;
  453.                                gotoxy (1,7); ClrEol;
  454.                                gotoxy (1,10); ClrEol;
  455.                                gotoxy (1,13); ClrEol;
  456.                                gotoxy (1,15); ClrEol;
  457.                            end;
  458.                        3 : begin
  459.                                 Done := True;  { Quit }
  460.                            end;
  461.                   end; { end of case for submenu #2 }
  462.  
  463.                3: Case Pulldown_Menu_Selection of
  464.                       1 : begin
  465.                                gotoxy (5,7);
  466.                                write ('You selected Pulldown Menu Number ',
  467.                                        Pulldown_Menu_Number,
  468.                                     ', Sub Menu Number ',
  469.                                        Pulldown_Menu_Selection);
  470.                                GotoXY (5,10);
  471.                                writeln ('With this information and a CASE statement you can now run your application.');
  472.                                gotoXY (5,14);
  473.                                WriteLn ('Hit the Return to continue ...');
  474.                                repeat
  475.                                      ch := readkey;
  476.                                until ch = #13;
  477.                                gotoxy (1,7); ClrEol;
  478.                                gotoxy (1,10); ClrEol;
  479.                                gotoxy (1,14); ClrEol;
  480.                            end;
  481.                        2 : begin
  482.                                gotoxy (5,7);
  483.                                write ('You selected Pulldown Menu Number ',
  484.                                        Pulldown_Menu_Number,
  485.                                     ', Sub Menu Number ',
  486.                                        Pulldown_Menu_Selection);
  487.                                GotoXY (5,10);
  488.                                writeln ('With this information and a CASE statement you can now run your application.');
  489.                                gotoXY (5,14);
  490.                                WriteLn ('Hit the Return to continue ...');
  491.                                repeat
  492.                                      ch := readkey;
  493.                                until ch = #13;
  494.                                gotoxy (1,7); ClrEol;
  495.                                gotoxy (1,10); ClrEol;
  496.                                gotoxy (1,14); ClrEol;
  497.                            end;
  498.                        3 : begin
  499.                                gotoxy (5,7);
  500.                                write ('You selected Pulldown Menu Number ',
  501.                                        Pulldown_Menu_Number,
  502.                                     ', Sub Menu Number ',
  503.                                        Pulldown_Menu_Selection);
  504.                                GotoXY (5,10);
  505.                                writeln ('With this information and a CASE statement you can now run your application.');
  506.                                gotoXY (5,14);
  507.                                WriteLn ('Hit the Return to continue ...');
  508.                                repeat
  509.                                      ch := readkey;
  510.                                until ch = #13;
  511.                                gotoxy (1,7); ClrEol;
  512.                                gotoxy (1,10); ClrEol;
  513.                                gotoxy (1,14); ClrEol;
  514.                            end;
  515.                   end; { end of case for submenu #3 }
  516.  
  517.                4: Case Pulldown_Menu_Selection of
  518.                        1 : begin
  519.                                gotoxy (5,7);
  520.                                write ('You selected Pulldown Menu Number ',
  521.                                        Pulldown_Menu_Number,
  522.                                     ', Sub Menu Number ',
  523.                                        Pulldown_Menu_Selection);
  524.                                GotoXY (5,10);
  525.                                writeln ('With this information and a CASE statement you can now run your application.');
  526.                                gotoXY (5,14);
  527.                                WriteLn ('Hit the Return to continue ...');
  528.                                repeat
  529.                                      ch := readkey;
  530.                                until ch = #13;
  531.                                gotoxy (1,7); ClrEol;
  532.                                gotoxy (1,10); ClrEol;
  533.                                gotoxy (1,14); ClrEol;
  534.                            end;
  535.                        2 : begin
  536.                                gotoxy (5,7);
  537.                                write ('You selected Pulldown Menu Number ',
  538.                                        Pulldown_Menu_Number,
  539.                                     ', Sub Menu Number ',
  540.                                        Pulldown_Menu_Selection);
  541.                                GotoXY (5,10);
  542.                                writeln ('With this information and a CASE statement you can now run your application.');
  543.                                gotoXY (5,14);
  544.                                WriteLn ('Hit the Return to continue ...');
  545.                                repeat
  546.                                      ch := readkey;
  547.                                until ch = #13;
  548.                                gotoxy (1,7); ClrEol;
  549.                                gotoxy (1,10); ClrEol;
  550.                                gotoxy (1,14); ClrEol;
  551.                            end;
  552.                   end; { end of case for submenu #4 }
  553.              end;  { end of case for Pulldown_Menu_Number }
  554.  
  555. (* ------------------------------------------------------------------------- *)
  556. (*                         Your code ends here                               *)
  557. (* ------------------------------------------------------------------------- *)
  558.              selection_made := false;
  559.         end;  { end of If Selection_Made loop }
  560.      until Done = True;
  561.      Cursor_On;
  562.      ClrScr;
  563. end.
  564.